export { }
function sum(num1: number, num2: number) {
    return num1 + num2
}
sum(100, 200)
function getIndex(arr: number[], value: number) {
    return arr.findIndex(item => item === value)
}
getIndex([1, 5, 6, 3, 8, 5, 10], 3)
const loginFn = (userName: string, password: string): boolean => {
    if (userName === 'admin' && password === '123456') {
        return true
    } else {
        return false
    }
}
loginFn('admin', '123456')
type loginFunc = (userName: string, password: string) => boolean
const loginFn2: loginFunc = (userName, password) => {
    if (userName === 'admin' && password === '123456') {
        return true
    } else {
        return false
    }
}
loginFn2('admin', '123456')


